package com.example.sls.controller.social;

import com.example.sls.pojo.social.ActivityRegistrations;
import com.example.sls.service.intserfaces.social.ActivityRegistrationsService;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * 活动报名表(ActivityRegistrations)表控制层
 *
 * @author 蓝江富
 * @since 2024-06-19 13:23:43
 */
@RestController
@RequestMapping("social/activityRegistrations")
public class ActivityRegistrationsController {
  @Autowired
  ActivityRegistrationsService activityRegistrationsService;

  @GetMapping("queryById")
  ActivityRegistrations queryById(Integer id) {
    return activityRegistrationsService.queryById(id);
  }

  @GetMapping("queryAllByLimit")
  List<ActivityRegistrations> queryAllByLimit(ActivityRegistrations activityRegistrations, Integer pageSize, Integer offset) {
    return activityRegistrationsService.queryAllByLimit(activityRegistrations, pageSize, offset);
  }

  @GetMapping("count")
  long count() {
    return activityRegistrationsService.count();
  }

  @GetMapping("insert")
  int insert(ActivityRegistrations activityRegistrations) {
    return activityRegistrationsService.insert(activityRegistrations);
  }

  @GetMapping("update")
  int update(ActivityRegistrations activityRegistrations) {
    return activityRegistrationsService.update(activityRegistrations);
  }

  @GetMapping("deleteById")
  int deleteById(Integer id) {
    return activityRegistrationsService.deleteById(id);
  }
}

